This area on the right side of the widget provides controls for
various print job options. Job parameters such as the number of
copies and banner page title may be specified in this area.
There is also a text field provided for specifying options
unique to the printer selected. The job option area will not be
displayed if the PPPPuuuuiiiiNNNNsssshhhhoooowwwwOOOOppppttttiiiioooonnnnssss resource (described below) is
set to FFFFaaaallllsssseeee. Each option in the job option area can be
selectively displayed by setting the appropriate resource
(described below) to FFFFaaaallllsssseeee.
AAAAccccttttiiiioooonnnn aaaarrrreeeeaaaa
The action area is located at the bottom of the widget and
contains the PrintBox action push buttons. There are five
action area push buttons, three of which are displayed by
default. The following buttons are managed (visible) by
default:
PPPPrrrriiiinnnntttt Submits the specified file or buffer for printing by
the spooling system. First the functions registered
on the PPPPuuuuiiiiNNNNpppprrrriiiinnnnttttCCCCaaaallllllllbbbbaaaacccckkkk list are invoked. Next, if
the PPPPuuuuiiiiNNNNpppprrrriiiinnnnttttiiiinnnnggggPPPPoooolllliiiiccccyyyy resource is set to
PPPPuuuuiiiiWWWWIIIIDDDDGGGGEEEETTTT____PPPPRRRRIIIINNNNTTTTIIIINNNNGGGG (the default), the PrintBox
widget's internal function is called to submit the
print job to the spooling system for printing. If
PPPPuuuuiiiiNNNNpppprrrriiiinnnnttttiiiinnnnggggPPPPoooolllliiiiccccyyyy is set to PPPPuuuuiiiiAAAAPPPPPPPPLLLLIIIICCCCAAAATTTTIIIIOOOONNNN____PPPPRRRRIIIINNNNTTTTIIIINNNNGGGG,
the widget's internal job submission function is not
called, and it becomes the application's
responsibility to submit the job for printing. If
the print job was successfully submitted, the
functions on the PPPPuuuuiiiiNNNNjjjjoooobbbbIIIInnnnffffooooCCCCaaaallllllllbbbbaaaacccckkkk list will be
invoked. If an error has occurred submitting the job,
the functions on the PPPPuuuuiiiiNNNNeeeerrrrrrrroooorrrrCCCCaaaallllllllbbbbaaaacccckkkk will be
invoked. Finally, if the PrintBox widget's
XXXXmmmmNNNNaaaauuuuttttooooUUUUnnnnmmmmaaaannnnaaaaggggeeee resource is set to TTTTrrrruuuueeee and the
widget is a child of a DialogShell, the PrintBox will
be automatically unmanaged (popped down) after the
are positioned between the PPPPrrrriiiinnnntttt and CCCCaaaannnncccceeeellll buttons. These
buttons may be managed using the _X_t_M_a_n_a_g_e_C_h_i_l_d function,
specifying the widget ID for the desired button. The widget ID
can be obtained from the _P_u_i_P_r_i_n_t_B_o_x_G_e_t_C_h_i_l_d function. When
activated, the User buttons invoke the functions registered on
their respective callback lists, PPPPuuuuiiiiNNNNuuuusssseeeerrrr1111CCCCaaaallllllllbbbbaaaacccckkkk
PPPPuuuuiiiiNNNNuuuusssseeeerrrr2222CCCCaaaallllllllbbbbaaaacccckkkk, PPPPuuuuiiiiNNNNuuuusssseeeerrrr3333CCCCaaaallllllllbbbbaaaacccckkkk and PPPPuuuuiiiiNNNNuuuusssseeeerrrr4444CCCCaaaallllllllbbbbaaaacccckkkk.
WWWWoooorrrrkkkk aaaarrrreeeeaaaa The PrintBox widget allows an application to specify one child
widget. This widget would typically be a MMMMaaaannnnaaaaggggeeeerrrr class widget
that would contain application-specific printing controls such
as page number range. When present, the work area is placed at
the top of the PrintBox and spans the entire width of the
spooling system, this resource will be NULL. If a non-NULL
value is returned, it is a pointer into widget private storage
and must not be deallocated.
PPPPuuuuiiiiNNNNffffdddd Specifies an open file descriptor from which data is to be
printed. This resource is used when PPPPuuuuiiiiNNNNjjjjoooobbbbTTTTyyyyppppeeee is set to
PPPPuuuuiiiiPPPPRRRRIIIINNNNTTTTJJJJOOOOBBBB____DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTOOOORRRR and is ignored otherwise.
PPPPuuuuiiiiNNNNffffiiiilllleeeennnnaaaammmmeeee
Specifies the name(s) of file(s) to be printed. Multiple
filenames may be specified separated by whitespace. Bourne
shell filename meta characters may be specified but job control
and other meta characters should not be specified and may be
disallowed by the widget. This resource is used when
PPPPuuuuiiiiNNNNjjjjoooobbbbTTTTyyyyppppeeee is set to PPPPuuuuiiiiPPPPRRRRIIIINNNNTTTTJJJJOOOOBBBB____FFFFIIIILLLLEEEENNNNAAAAMMMMEEEE otherwise it is
ignored. If this resource is read and the value is not NULL,
the storage associated with this resource should be freed using
_X_t_F_r_e_e(_3_X_t) when no longer needed.
PPPPuuuuiiiiNNNNjjjjoooobbbbTTTTyyyyppppeeee
The PrintBox widget can print data from three sources: files,
file descriptors or buffers. PPPPuuuuiiiiNNNNjjjjoooobbbbTTTTyyyyppppeeee specifies which print
source is to be used. The following table indicates the values
Note that the filename entry area is displayed only when
PPPPuuuuiiiiNNNNjjjjoooobbbbTTTTyyyyppppeeee is set to PPPPuuuuiiiiPPPPRRRRIIIINNNNTTTTJJJJOOOOBBBB____FFFFIIIILLLLEEEENNNNAAAAMMMMEEEE and PPPPuuuuiiiiNNNNsssshhhhoooowwwwFFFFiiiilllleeeennnnaaaammmmeeee
Specifies who is responsible for submitting print jobs to the
spooling system. The PrintBox widget has an internal routine
for submitting jobs. This routine is invoked by activating the
PPPPrrrriiiinnnntttt button or by calling the _P_u_i_P_r_i_n_t_B_o_x_D_o_P_r_i_n_t(_3_X) function.
If PPPPuuuuiiiiNNNNpppprrrriiiinnnnttttiiiinnnnggggPPPPoooolllliiiiccccyyyy is set to PPPPuuuuiiiiWWWWIIIIDDDDGGGGEEEETTTT____PPPPRRRRIIIINNNNTTTTIIIINNNNGGGG (the
default) the internal job submittal function will be used. If
this resource is set to PPPPuuuuiiiiAAAAPPPPPPPPLLLLIIIICCCCAAAATTTTIIIIOOOONNNN____PPPPRRRRIIIINNNNTTTTIIIINNNNGGGG the internal
routine will not be called and it becomes the responsibility of
the application to submit the print job to the spooling system.
Specifies the list of callback functions called when the user
activates the PPPPrrrriiiinnnntttt button or calls the _P_u_i_P_r_i_n_t_B_o_x_D_o_P_r_i_n_t(_3_X)
function. The callback reason is PPPPuuuuiiiiCCCCRRRR____PPPPRRRRIIIINNNNTTTT. This callback
provides a number of capabilities. If PPPPuuuuiiiiNNNNpppprrrriiiinnnnttttiiiinnnnggggPPPPoooolllliiiiccccyyyy is
PPPPuuuuiiiiWWWWIIIIDDDDGGGGEEEETTTT____PPPPRRRRIIIINNNNTTTTIIIINNNNGGGG (the default), the functions on this
callback are called before any printing is performed by the
widget. This allows the application to perform any pre-printing
processing such as setting a busy cursor or specifying a buffer
for the _P_u_i_P_r_i_n_t_B_o_x widget to print. Upon return from the last
user specified callback function, the widget will submit a
print job. If PPPPuuuuiiiiNNNNpppprrrriiiinnnnttttiiiinnnnggggPPPPoooolllliiiiccccyyyy is PPPPuuuuiiiiAAAAPPPPPPPPLLLLIIIICCCCAAAATTTTIIIIOOOONNNN____PPPPRRRRIIIINNNNTTTTIIIINNNNGGGG,
this callback would be used by the application to submit a
The PrintBox widget inherits its translations from the XmBulletinBoard
widget class.
NNNNOOOOTTTTEEEESSSS
1. The PrintBox widget determines what printers are available when it
is instantiated. Therefore, the PPPPuuuuiiiiNNNNpppprrrriiiinnnntttteeeerrrrLLLLiiiisssstttt, PPPPuuuuiiiiNNNNnnnnuuuummmmPPPPrrrriiiinnnntttteeeerrrrssss,
and PPPPuuuuiiiiNNNNddddeeeeffffPPPPrrrriiiinnnntttteeeerrrr resources are not updated if the printing
environment changes during the PrintBox widget's lifetime.
2. The PrintBox widget can report an error condition on its
PPPPuuuuiiiiNNNNeeeerrrrrrrroooorrrrCCCCaaaallllllllbbbbaaaacccckkkk during initial management and realization if the
System V print spooling scheduler _l_p_s_c_h_e_d is not running or if an
error occurs determining the list of available printers.
Applications with functions registered on this callback list should
be prepared to handle errors at this point in the PrintBox widget
life cycle.
4. Do not set a new value for the PPPPuuuuiiiiNNNNpppprrrriiiinnnntttteeeerrrrOOOOppppttttiiiioooonnnnssss resource while a
printer-specific option panel is displayed. The printer-specific
options selected in the option panel will override the options set
by the resource.
5. The printer selection list should use fixed width fonts for both the
regular printers and the default printer. A fixed width font will
preserve the columnar organization of the list items.
6. When the PrintBox widget is instantiated it determines the username
based on the current real UID. The username is used for the reading
and saving option settings. If the real UID is changed
programmatically after the PrintBox has been instantiated, the
widget must be destroyed and re-instantiated if it is to save